<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let promise=Promise.resolve("唐玮");
        promise=promise.then(v=>{
            return new Promise(resolve=>{
                setTimeout(() => {
                    resolve();//3s后才允许后面的then执行
                   console.log("第一个promise"); 
                }, 3000);
            })
        })

        //再对promise对后面操作
        promise.then(v=>{
            setTimeout(()=>{
                console.log("第二个promise");
            },1000)
        })
        //就做到了promise队列了，后面一个必须等待前面一个做完
    </script>
</body>
</html>